//
//  GolfViewController.h
//  Golf
//
//  Created by mrbradle on 11/28/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <math.h>

#import "GolfGame.h"
#import "PlayerViewController.h"

@interface GolfViewController : UIViewController <UIAlertViewDelegate> {
   
    GolfGame* game;
    
    UIImage** cardImages;
    
    NSMutableArray* playerVCs;
    
    UILabel* roundLabel;
    UILabel* nameLabel;
    UILabel* scoreLabel;
    
    UIButton* drawButton;
    UIButton* discardButton;
    UIImageView* drawnCard;
    
    UIButton* cardButton1; //yay for hardcoding 4!  If I ever work on this more, I'll put this into an array
    UIButton* cardButton2;
    UIButton* cardButton3;
    UIButton* cardButton4;
    
    UIButton* knockButton;
    UIButton* nextButton;
    
    int currentPlayer;
    
    PlayerViewController** playerVCs2;
    
}

+ (int)CENTER_X;
+ (int)CENTER_Y;
+ (int)RADIUS_X;
+ (int)RADIUS_Y;

- (void)initGame:(GolfGame*)game_;

- (void)updateView;

- (IBAction)swap:(id)sender;
- (IBAction)draw;
- (IBAction)discard;
- (IBAction)knock;
- (IBAction)pass;

- (IBAction)next;

- (IBAction)hya:(id)sender;

- (void)endTurn;
- (void)endRound;
- (void)startRound;
- (void)endGame;


@property (nonatomic) int currentPlayer;

@property (nonatomic)  PlayerViewController** playerVCs2;

@property (nonatomic,retain) IBOutlet GolfGame* game;
@property (nonatomic,retain) IBOutlet NSMutableArray* playerVCs;

@property (nonatomic) IBOutlet UIImage** cardImages;

@property (nonatomic,retain) IBOutlet UILabel* roundLabel;
@property (nonatomic,retain) IBOutlet UILabel* nameLabel;
@property (nonatomic,retain) IBOutlet UILabel* scoreLabel;

@property (nonatomic,retain) IBOutlet UIButton* drawButton;
@property (nonatomic,retain) IBOutlet UIButton* discardButton;
@property (nonatomic,retain) IBOutlet UIButton* passButton;
@property (nonatomic,retain) IBOutlet UIImageView* drawnCard;

@property (nonatomic,retain) IBOutlet UIButton* cardButton1;
@property (nonatomic,retain) IBOutlet UIButton* cardButton2;
@property (nonatomic,retain) IBOutlet UIButton* cardButton3;
@property (nonatomic,retain) IBOutlet UIButton* cardButton4;

@property (nonatomic,retain) IBOutlet UIButton* knockButton;
@property (nonatomic,retain) IBOutlet UIButton* nextButton;

@end
